package com.kws.merchant.service.impl;


import com.kws.merchant.domain.OperationTicketItem;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.kws.merchant.mapper.OperationTicketItemMapper;
import com.kws.merchant.service.OperationTicketItemService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;

import java.util.List;

/**
 * 两票项目(OperationTicketItem)表服务实现类
 *
 * @author yxy
 * @since 2024-12-12 11:47:31
 */
@Service("operationTicketItemService")
public class OperationTicketItemServiceImpl extends ServiceImpl<OperationTicketItemMapper, OperationTicketItem> implements OperationTicketItemService {

    @Resource
    private OperationTicketItemMapper operationTicketItemMapper;


    /**
     * 分页查询列表
     */
    @Override
    public Page<OperationTicketItem> pageList(OperationTicketItem operationTicketItem) {
        Page<OperationTicketItem> page = new Page<>(0, 10);
        LambdaQueryWrapper<OperationTicketItem> queryWrapper = Wrappers.lambdaQuery();

        return this.page(page, queryWrapper);
    }

    /**
     * 查询票据项目
     * @param id
     * @return
     */
    @Override
    public List<OperationTicketItem> listByTicketId(Long id) {
        return operationTicketItemMapper.listByTicketId(id);
    }


}
